<!--
 * @Author: linzaifei 1609781601@qq.com
 * @Date: 2025-07-23 16:08:12
 * @LastEditors: linzaifei 1609781601@qq.com
 * @LastEditTime: 2025-08-15 13:17:53
 * @FilePath: /amap-web-vr/src/views/home/control/vc-sign-control/vc-sign-table.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="vc-sign-table">
      <vc-web-url-dialog @tap="close" :show-close="false">
        <template #header>
          <div class="vc-sign-table-header">
            <img src="@/assets/images/ic_fill_close.png" @click="emits('tap')" />
            <h4>保存标记点</h4>
            <img src="@/assets/images/ic_fill_success.png" @click="emits('save')" />
          </div>
        </template>
        
       <div class="vc-sign-table-content">
            <div class="vc-sign-table-content-header">
                <div class="title">标题</div>
                <el-input class="input" placeholder = "请输入标题" />
            </div>
            <el-scrollbar height="100%" class="vc-sign-table-content-body">
                <div v-for="(item ,index) in billboards" :key="index" class="vc-sign-table-content-body-item">
                  <el-image src="https://zouyaoji.top/vue-cesium/images/grepin.png" fit="cover" />
                  <el-input
                    v-model="(item as any)!.name"
                    style="width: 240px"
                    placeholder="标记点名称"
                  />
                  <el-button type="danger" @click="emits('del',index)">删除</el-button>
                </div>
              </el-scrollbar>
        </div>
            
        
      </vc-web-url-dialog>
    </div>
</template>

<script lang="ts" setup>
import { defineEmits } from 'vue'
import VcWebUrlDialog from '../vc-dialog/vc-web-url-dialog.vue'
const emits = defineEmits(['tap',"del",'save'])
defineProps({
    billboards: {
        type: Array,
        default: () => [],
    }
})

const close = () => {
  console.log('close')
}
</script>

<style lang="scss" scoped>
.vc-sign-table{
  &-header{
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    img{
      width: 24px;
      height: 24px;
    }
    h4{
      font-size: var(--font-size-xs);
      font-weight: bold;
    }

  }
  &-content{
    height: 100%;
    &-header{
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      margin-bottom: var(--margin-sm);
      border-radius: var(--border-raduis);
      padding:var(--padding-sm);
      background-color: var(--el-color-white);
      .title{
        width: 40px;
        font-weight: bold;
        font-size: var(--font-size-xs);
        text-align: center;
      }
      .input{
        border: none !important;
        font-size: var(--font-size-xs);
        :deep(.el-input__wrapper){
          box-shadow: none !important;
          // border-bottom: solid 1px var(--el-border-color) !important;
        }
      }
      
      height: 40px;
    }
    &-body{
      height: calc(100% - 40px);
      background-color: var(--el-color-white);
      border-radius: var(--border-raduis);
      padding:var(--padding-sm);
        &-item{
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: center;
            .el-image{
              width: 24px;
              height: 24px;
              margin-right: 5px;
            }
            .el-input{
              margin-right: 5px;
              font-size: var(--font-size-xs)
            }
            margin-bottom: 10px;
        }
    }
  }
  

  :deep(.zf-dialog-container){
    max-width: 300px;
    background-color: #f1f1f1;
  }
}
</style>